<?php
session_start();
include_once('includes/db.php');
function menu()
{
?>	
	<li><a href='#'>Home</a></li>
	<li><a href='signup.php'>Register</a></li>
<?php	
}
?>

<?php
include_once('header.php');
$str="SELECT * FROM `article`";
$result=mysql_query($str);
$num=mysql_num_rows($result);
for($i=0;$i<$num;$i++)
{
	$row=mysql_fetch_array($result);
	echo "<h2>".$row['title']."</h2>";
	$post=substr($row['article'],0,200);
	echo $post."&nbsp;&nbsp;";
	echo "<a href='post.php?id=".$row['id']."'>Read more</a>";
}


echo "<br/>";
include_once('footer.php');
?>